Skip to content

Conversation

@fmabille09
Copy link

@fmabille09 fmabille09 commented Aug 25, 2022

BEFORE : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF: +(?P\S+)$')
AFTER : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF:+(?P\S+)$')

Remove the space after "VRF:" in the regex.

Description

Support issue link - #693

Motivation and Context

On some n9k, when launching command: "show isis adjacency vrf all", the output put a whitespace or not after VRF. So the output can be
"IS-IS process: process_id VRF: default" or "IS-IS process: process_id VRF:default"

But actually the parser only support a white space.

p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF: +(?P\S+)$')"

Impact (If any)

Change regex on parser to support whitespace or not

Screenshots:

Checklist:

  • I have updated the changelog.
  • I have updated the documentation (If applicable).
  • I have added tests to cover my changes (If applicable).
  • All new and existing tests passed.
  • All new code passed compilation.

BEFORE : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF: +(?P<vrf>\S+)$')
AFTER   : p1 = re.compile(r'^IS-IS +[Pp]rocess: +(?P<process_id>\S+) +VRF:+(?P<vrf>\S+)$')

Remove the space after "VRF:" in the regex.
@fmabille09 fmabille09 requested a review from a team as a code owner August 25, 2022 09:30
@sjpatel21
Copy link

Thanks for your contribution @fmabille09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants